package com.zbkj.crmeb.enums;

import org.apache.commons.lang3.StringUtils;

import java.util.Objects;

/**
 * 广交会-sku量枚举
 * @Author: wangzh
 * @Date: 2023/4/14 16:41
 */
public enum SkuNumberEnum {

    BELOW_ONE_HUNDRED(1, "100以下"),

    ONE_HUNDRED_TO_ONE_THOUSAND(2, "100-1000"),

    ONE_THOUSAND_TO_2500(3, "1000-2500"),

    TWO_THOUSAND_FIVE_HUNDRED_TO_FIVE_THOUSAND(4, "2500-5000"),

    OVER_FIVE_THOUSAND(5, "5000以上"),

    ;

    private final Integer code;

    private final String msg;

    SkuNumberEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static SkuNumberEnum getEnum(String msg) {
        for (SkuNumberEnum value : values()) {
            if (StringUtils.equals(msg, value.getMsg())) {
                return value;
            }
        }
        return null;
    }
}
